<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link rel="stylesheet" href="css/css.css" />
		<link rel="stylesheet" href="../../css/allApp.css" />
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<style type="text/css">

		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">异常填写</h1>
		</header>
		<div class="mui-content">
			<div class="xj-content">
				<div class="H-10"></div>
				<div class="mui-card">
					<!--页眉，放置标题-->
					<div class="mui-card-header">
						<div class="mui-left Title">
						</div>
					</div>
					<!--内容区-->
					<div class="mui-card-content" style="border: 0;">
						<p class="biaozhun"></p>
						<div class="yichang-text">
							<div class="textarea">

								<textarea placeholder="填写备注"></textarea>
							</div>
							<div class="img-up">
								<div class="photo"id="">
									<!--<img src="" alt="" class="headimg" />-->
									<img src="" alt="" class="headimg" data-preview-src="" data-preview-group="1"/>
									<span class="mui-icon mui-icon-closeempty delete"></span>
								</div>
								<div class="img" id="userImg">
									<span class="mui-icon mui-icon-image"></span>
									<p>拍照上传</p>
								</div>
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
		<div class="btn">
			<button type="button" class="mui-btn mui-btn-primary mui-col-2 " id="sure">确定</button>
			<button type="button" class="mui-btn mui-btn-default mui-col-2" id="cancle">取消</button>
		</div>
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/jquery-3.2.1.min.js"></script>
		<script type="text/javascript" src="../../js/mkeyplus.base.xunjian.js"></script>
		<script src="../../js/uuid.js"></script>
		<script type="text/javascript" src="../../js/common.js"></script>
		<script src="./js/mui.previewimage.js"></script>
		<script src="./js/mui.zoom.js"></script>
		<script src="./js/up.js"></script>
		<script type="text/javascript">
			mui.init();
			mui.previewImage();
			//添加图片
			mui.plusReady(function() {
				var self = plus.webview.currentWebview();
				var data_id = self.data_id;
				$('.Title').text(self.title);
				 $('.textarea textarea').val(self.Text);
				$('.biaozhun').text(self.Ltitle);
//				alert(self.attach);
				if(self.attach==''||self.attach==undefined){
					
				}else{
					$(".photo").show();
					$(".img").hide();
					$('.photo img').attr('src',self.imgSrc);
					$('.photo').attr('id',self.attach);
				}
				
				mui('.btn').on('tap', '#sure', function() {
					var img = $('.photo img').attr('src');
					var attach = $('.photo').attr('id');
					var Text = $('.textarea textarea').val();
					var main = plus.webview.getWebviewById("xianchangxunjian.html");
					mui.fire(main, 'Change', {
						img: img,
						Text: Text,
						dataId: data_id,
						attach: attach

					});
					if(img==""){
						mui.toast('请上传图片');
					}else if(Text==""){
						mui.toast('请填写备注');
					}else{
						mui.back();
					}
					
				});
				mui('.btn').on('tap', '#cancle', function() {
					mui.back();
				});
				/*$(".mui-card").on("tap", ".img", function() {
					var $img = $(this).parents().parents().parents('div');
					$img.addClass("selectLi");
					$img.siblings().removeClass("selectLi");
					page.imgUp();
				})*/
			});
		</script>
	</body>

</html>